﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OurMemory
{
    public partial class FormMyInformation : Form
    {
        public FormMyInformation()
        {
            InitializeComponent();
            pictureBox2.Image = Image.FromFile(@"C:\Users\月亮\Desktop\final-projecte2-master\OurMemory\Properties\MyInformation2.jpg");
            panel1.BackgroundImage = Image.FromFile(@"C:\Users\月亮\Desktop\final-projecte2-master\OurMemory\Properties\IF1.jpg");
            panel1.BackgroundImageLayout = ImageLayout.Stretch;

            // 启用双缓冲以减少闪烁
            this.DoubleBuffered = true;
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            // 创建线性渐变刷
            using (LinearGradientBrush brush = new LinearGradientBrush(
                new PointF(this.ClientRectangle.Left, this.ClientRectangle.Top),
                new PointF(this.ClientRectangle.Right, this.ClientRectangle.Bottom),
                Color.LightSkyBlue,
                Color.LightBlue))
            {
                // 使用渐变刷填充背景
                e.Graphics.FillRectangle(brush, this.ClientRectangle);
            }

            // 调用基类的 OnPaint 方法
            base.OnPaint(e);
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {

        }

        private void FormMyInformation_Load(object sender, EventArgs e)
        {

        }
    }
}
